<script setup lang="ts">
import useRouteCache from '@/hooks/useRouteCache'

// 路由缓存
const { caches } = useRouteCache()

//输出环境和版本
let text = `
    \t\tPublished ${__APP_VERSION__ ? __APP_VERSION__ : '1.0.1'} 
    xxx-${import.meta.env.MODE}
    \t\tBuild date: ${__APP_BUILD_DATE__ ? __APP_BUILD_DATE__ : ''}
    `

console.log(`%c${text}`, 'color: #fc4d50')
</script>

<template>
  <router-view v-slot="{ Component }">
    <keep-alive :include="caches">
      <component :is="Component" />
    </keep-alive>
  </router-view>
</template>

<style lang="scss"></style>
